/*
face_detect_view.hpp
 */
#pragma once

#include <QWidget>
#include <QLabel>
#include <QLineEdit>
#include <QCheckBox>
#include <QDoubleSpinBox>
#include <QRadioButton>
#include <QPushButton>
#include <QComboBox>
#include "face_detect_thread.hpp"

class FaceDetectView : public QWidget
{
  Q_OBJECT

public:
  FaceDetectView();
  void initUIs();
public slots:
  void select_image();
  void select_config_file();
  void select_weight_file();
  void do_face_detect();
  void postProcess(cv::Mat frame);

private:
  int index;
  bool is_camera_running;

  QLabel* image_label;
  // 行输入框
  QLineEdit* weight_file_edit;
  QLineEdit* config_file_edit;
  // 勾选框
  QCheckBox* show_fps_chk;
  QCheckBox* show_score_chk;
  // 计数调节器
  QDoubleSpinBox* score_spinbox;
  // 点选器
  QRadioButton* img_file_rbt;
  QRadioButton* video_file_rbt;
  QRadioButton* vision_file_rbt;

  QLineEdit* data_file_edit;

  QPushButton* applyBtn;
  QPushButton* disconnect_camera_btn;

  QComboBox* camera_combo;
  FaceDetectThread* face_detect_thread;
};